<template>
	<div>
		child
		<p>{{title}}</p>
		<p>{{getCount}}</p>
		<button @click='sendMsg'>回应</button>
	</div>
</template>
<script>
	export default {
		name:'child',
		data(){
			return {
				msg:'好的 好的'
			}
		},
		components: {
			
		},
		props: {
			title:{
					type:String,
					default: ''
				}

		},
		methods: {
			sendMsg : function() {
				this.$emit('info',this.msg);
			}
		},
		//计算
		computed: {
			getCount:function(argument) {
				return this.$store.state.count;
			}
		}
	}
</script>
<style scoped>
	
</style>